package com.sky.controller;


import com.sky.dto.ItemPageQueryDTO;
import com.sky.result.PageResult;
import com.sky.result.Result;
import com.sky.service.ItemService;
import com.sky.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LiZhiHan
 */
@Slf4j
@RequiredArgsConstructor
@RestController
@Api(tags = "查询接口")
@RequestMapping("item")
public class ItemController {

	private final ItemService itemService;

	@GetMapping("/page")
	@ApiOperation("体育项目查询")
	public Result<PageResult> select(ItemPageQueryDTO itemPageQueryDTO) {
		log.info("体育项目查询,参数为：{}", itemPageQueryDTO);
		PageResult pageResult = itemService.select(itemPageQueryDTO);
		return Result.success(pageResult);
	}
}